package com.cn.stusy0015.demo008;

/**
 * @author lw
 * @ClassName TestFish.java
 * @Description
 * @createTime 2023年05月20日 11:41:00
 */
public class TestFish {
    public static void main(String[] args) {
        String word = "Hello,     ";
        word = word.trim();
        String s = word.concat("小鱼儿!");
        int index1 = s.indexOf(",");
        int index2 = s.lastIndexOf("!");
        System.out.println(s.substring(index1 + 1, index2));
    }
}
